import pymysql.cursors
from pymysql import Connection

conn = pymysql.Connection(
    host="10.9.50.233",
    port=3306,
    user="cx_rw",
    password="cx_rw@2020@"
)

conn.select_db("super_saas_rbac")

cursor = conn.cursor(pymysql.cursors.DictCursor)

cursor.execute("select * from system_tenant where is_pay = 1")

res = cursor.fetchall()

for v in res:
    print(v)

conn.close()